from rest_framework.test import APITestCase


def schema_ref(schema: dict = None):
    if schema and schema.get('$ref'):
        ref = schema.get('$ref').replace('#/', '')
        schema = f"open('tests/fixtures/{ref}.json')"

    return schema


class BaseAPITestCase(APITestCase):
    ...
